

msg = '你好哦'


let buff = Buffer.from(msg, 'utf-8')

let base64_encoded = buff.toString('base64')

console.log('base64_encoded:', base64_encoded)
// 5L2g5aW95ZOm


let buff2 = Buffer.from(base64_encoded, 'base64')
let base64_decoded = buff2.toString('utf-8')
console.log('base64_decoded:', base64_decoded)





